<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/admin/inc/tag.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML><HEAD><TITLE>方案</TITLE>
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>
<META name=keywords content="">
<META name=description content="">
<LINK rel="stylesheet" type="text/css" href="css/Diy_detail.css">
<script type="text/javascript" src="js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/base.js"></script>
<SCRIPT type=text/javascript>
	function setProduct(configId, productId, productName, price) {
		productName = unescape(productName);
		$("#tr_" + configId).css("display", "");
		$("#name_" + configId).html(productName);
		$("#num_" + configId).html("1");
		$("#price_" + configId).html(price);
		calTotal();
	}
	
	function calTotal() {
		var priceArr = $("[name=price]");
		if(priceArr != null && priceArr.length > 0) {
			var totalPrice = 0;
			for(var i=0; i< priceArr.length; i++) {
				var price = priceArr[i].innerHTML;
				if(price != null && price != "") {
					totalPrice += parseFloat(price);
				}
			}
			$("#totalPrice1").html(totalPrice);
			$("#totalPrice2").html(totalPrice);
		}
	}
</SCRIPT>
<META name=GENERATOR content="MSHTML 8.00.7601.17940"></HEAD>
<BODY>
<admin:viewScheme name="main" name1="details" id="${param.id}" />
<DIV class=main style="margin:0 auto;">
	<H1 class=headline>${main.scheme_name} </H1>
	<DIV id=sendToBbsMsg class="msg_box mt"></DIV>
	<DIV class="cj_author mt">
		<P><SPAN class=date>${main.scheme_create_time}</SPAN> 总价：<SPAN class=price id="totalPrice1"></SPAN> 元</P>
	</DIV>
	<DIV class="corner_box param_box mt">
		<DIV class=corner_title><STRONG class=t8>网友配置方案</STRONG></DIV>
		<TABLE id=proList class="parts_list_table parts_list_table_compare">
			<TBODY>
				<TR>
					<TH class=item>配置</TH>
					<TH class=name>品牌型号</TH>
					<TH>数量</TH>
					<TH>单价</TH>
				</TR>
				<admin:configList name="configs" />
				<c:forEach items="${configs}" var="config">
					<TR>
						<TD class=item>${config.config_name}</TD>
						<TD class=name id="name_${config.config_id}"></TD>
						<TD class=num id="num_${config.config_id}"></TD>
						<TD class=price1 name="price" id="price_${config.config_id}"></TD>
					</TR>
				</c:forEach>
				<TR id="tr_-999" style="display: none;">
					<TD class=item>其他1</TD>
					<TD class=name id="name_-999"></TD>
					<TD class=num id="num_-999"></TD>
					<TD class=price1 name="price" id="price_-999"></TD>
				</TR>
				<TR id="tr_-1000" style="display: none;">
					<TD class=item>其他2</TD>
					<TD class=name id="name_-1000"></TD>
					<TD class=num id="num_-1000"></TD>
					<TD class=price1 name="price" id="price_-1000"></TD>
				</TR>
				<TR id="tr_-1001" style="display: none;">
					<TD class=item>其他3</TD>
					<TD class=name id="name_-1001"></TD>
					<TD class=num id="num_-1001"></TD>
					<TD class=price1 name="price" id="price_-1001"></TD>
				</TR>				
				<TR id="tr_-1002" style="display: none;">
					<TD class=item>其他4</TD>
					<TD class=name id="name_-1002"></TD>
					<TD class=num id="num_-1002"></TD>
					<TD class=price1 name="price" id="price_-1002"></TD>
				</TR>
			</TBODY>
		</TABLE>
		<DIV class=clearfix>
			<DIV class=total_price>合计金额：<SPAN id="totalPrice2"></SPAN> 元</DIV>
		</DIV>
	</DIV>
	<DIV class="corner_box_b introduction">
		<DL>
			<DT>说明：</DT>
			<DD>${main.scheme_note}</DD>
		</DL>
	</DIV>
	<c:forEach items="${details}" var="detail">
		<script type="text/javascript">
			setProduct("${detail.config_id}","${detail.product_id}", escape("${detail.product_name}"), "${detail.product_price}");
		</script>
	</c:forEach>
	<center>
		<input type="button" value="还原方案" onclick="javascript:window.open('/pc/zj/zj.jsp?id=${param.id}&isDisplaySavedScheme=1');" style="font-size:14px;width:131px;height:34px;line-height:30px;margin-top:10px;cursor:pointer;"/>
	</center>
</DIV>
</BODY></HTML>
